import fetch from 'common/src/utils/fetch';

/**
 * 查询申请辅修报名名单列表
 */
export function queryApplyMinorSignUpList(data) {
    return fetch({
        url:
            '/api/cultureservice/applyMinorSignUpList/queryApplyMinorSignUpList',
        method: 'POST',
        data
    });
}

/**
 * 录取学生
 */
export function matriculateStudent(data) {
    return fetch({
        url: '/api/cultureservice/applyMinorSignUpList/matriculateStudent',
        method: 'POST',
        data
    });
}

/**
 * 取消录取
 */
export function cancelMatriculate(data) {
    return fetch({
        url: '/api/cultureservice/applyMinorSignUpList/cancelMatriculate',
        method: 'POST',
        data
    });
}

/**
 *  完成辅修报名
 */
export function finishMinorApply(data) {
    return fetch({
        url: '/api/cultureservice/applyMinorSignUpList/finishMinorApply',
        method: 'POST',
        data
    });
}

/**
 *  导出学生报名名单信息
 */
export function exportStudentList(params) {
    let url = '/api/cultureservice/applyMinorSignUpList/exportStudentList';
    let query = '?';
    for (let key in params) {
        query += key;
        query += '=';
        query += params[key];
        query += '&';
    }
    return url + query.substring(0, query.length - 1);
}

// 新增白名单 
export function specialWhiteList(data) {
    return fetch({
        url: '/api/cultureservice/applyMinorSignUpList/specialWhiteList',
        method: 'POST',
        data
    });
}
//

// 根据辅修年级和辅修学院查询辅修专业和辅修绩点
export function queryMinorProfessionByFaculty(data) {
    return fetch({
        url: '/api/cultureservice/collegeMajor/queryMinorProfession',
        method: 'POST',
        data
    });
}